package com.xingling.controller;

import com.xingling.provider.DemoService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * <p>Title:      TestController. </p>
 * <p>Description TODO </p>
 * <p>Company:    http://www.hnxianyi.com </p>
 *
 * @author         <a href="190332447@qq.com"/>杨文生</a>
 * @since      2017/12/19 16:00
 */
@Controller
public class TestController {

	/**
	 * The Demo service.
	 */
	@Resource
	private DemoService demoService;
	/**
	 * <p>Title:      test. </p>
	 * <p>Description </p>
	 *
	 * @param name the name
	 * @return json object
	 * @Author <a href="190332447@qq.com"/>杨文生</a>
	 * @since 2017 /12/19 16:00
	 */
	@ResponseBody
	@RequestMapping("/test/{name}")
	public String testJson(@PathVariable("name") String name) {
		return demoService.sayHello(name);
	}
}